package com.xjgc.eip.panel.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xjgc.eip.panel.entity.ZxjEipDnbCssz;
import com.xjgc.eip.panel.mapper.ZxjEipDnbCsszMapper;
import com.xjgc.eip.panel.service.ZxjEipDnbCsszService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhanghongbin
 * @since 2019-11-17
 */
@DS("proxyDs")
@Service
public class ZxjEipDnbCsszServiceImpl extends ServiceImpl<ZxjEipDnbCsszMapper, ZxjEipDnbCssz> implements ZxjEipDnbCsszService {

    @Autowired
    private ZxjEipDnbCsszMapper zxjEipDnbCsszMapper;
    @Override
    public List list(String supplierCode, String testCode) {
        List<ZxjEipDnbCssz> list = zxjEipDnbCsszMapper.selectRecords(testCode,supplierCode);
        return list;
    }
//    @Autowired
//    ZxjEipScddService zxjEipScddService;
//    @Autowired
//    ZxjEipGdService zxjEipGdService;
//    public Boolean isPushed(){
//        QueryWrapper<ZxjEipDnbCssz> queryWrapper = new QueryWrapper<>();
//        List<String> sc_list = zxjEipScddService.getNo();
//        List<String> gd_list = new ArrayList<>();
//        //遍历取出合格的生产工单号
//        for (ZxjEipGd gd:zxjEipGdService.getEntities()) {
//            gd_list.add(gd.getWoNo());
//        }
//        queryWrapper.in("\"PRODUCTION_ORDER_ID\"",sc_list).in("\"WORK_ORDER_CODE\"",gd_list);
//        List<ZxjEipDnbCssz> list = this.list(queryWrapper);
//        if (list.size()>0){
//            return true;
//        }
//        return false;
//    }
}
